package hu.mapro.gwtui.gxt.client.fieldseditor.field;

import hu.mapro.gwtui.gxt.client.fieldseditor.FieldCreationInterface;
import hu.mapro.model.Getter;
import hu.mapro.model.Setter;

import com.google.gwt.editor.client.EditorDelegate;
import com.google.gwt.user.client.ui.Widget;

public interface EditorFieldInterface<V> {

	void setContext(FieldCreationInterface ctx);
	
	void flush();

	void setDelegate(EditorDelegate<V> delegate);
	
	<T, A extends Getter<T, V>&Setter<T, V>> void edit(
			A accessor,
			T baseObject
	);

	Widget asWidget();

	void focus();
	
	void checkDirty();
	
}